<?php

use Webman\GatewayWorker\Gateway;
use Webman\GatewayWorker\BusinessWorker;
use Webman\GatewayWorker\Register;

//这里添加了一个 gateway，监听 0.0.0.0:7373 端口，site_id 为 chat，client_id 为 1~1000
//需要时候解开

return [
//    'gateway' => [
//        'handler'     => Gateway::class,
//        'listen'      => 'websocket://0.0.0.0:7373',
//        'count'       => 2,
//        'reloadable'  => false,
//        'constructor' => ['config' => [
//            'lanIp'           => '127.0.0.1',
//            'startPort'       => 2301,
//            'pingInterval'    => 25,
//            'pingData'        => '{"type":"ping"}',
//            'registerAddress' => '127.0.0.1:1237',
//            'onConnect'       => function(){},
//        ]]
//    ],
//    'worker' => [
//        'handler'     => BusinessWorker::class,
//        'count'       => cpu_count()*2,
//        'constructor' => ['config' => [
//            'eventHandler'    => plugin\webman\gateway\Events::class,
//            'name'            => 'ChatBusinessWorker',
//            'registerAddress' => '127.0.0.1:1237',
//        ]]
//    ],
//    'register' => [
//        'handler'     => Register::class,
//        'listen'      => 'text://127.0.0.1:1237',
//        'count'       => 1, // Must be 1
//        'reloadable'  => false,
//        'constructor' => []
//    ],
];
